package com.ruoyi.material.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.material.mapper.ZnMaterialCurrentStockMapper;
import com.ruoyi.material.domain.ZnMaterialCurrentStock;
import com.ruoyi.material.service.IZnMaterialCurrentStockService;

/**
 * 产品当前库存Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-02-21
 */
@Service
public class ZnMaterialCurrentStockServiceImpl implements IZnMaterialCurrentStockService 
{
    @Autowired
    private ZnMaterialCurrentStockMapper znMaterialCurrentStockMapper;

    /**
     * 查询产品当前库存
     * 
     * @param id 产品当前库存主键
     * @return 产品当前库存
     */
    @Override
    public ZnMaterialCurrentStock selectZnMaterialCurrentStockById(Long id)
    {
        return znMaterialCurrentStockMapper.selectZnMaterialCurrentStockById(id);
    }

    /**
     * 查询产品当前库存列表
     * 
     * @param znMaterialCurrentStock 产品当前库存
     * @return 产品当前库存
     */
    @Override
    public List<ZnMaterialCurrentStock> selectZnMaterialCurrentStockList(ZnMaterialCurrentStock znMaterialCurrentStock)
    {
        return znMaterialCurrentStockMapper.selectZnMaterialCurrentStockList(znMaterialCurrentStock);
    }

    /**
     * 新增产品当前库存
     * 
     * @param znMaterialCurrentStock 产品当前库存
     * @return 结果
     */
    @Override
    public int insertZnMaterialCurrentStock(ZnMaterialCurrentStock znMaterialCurrentStock)
    {
        return znMaterialCurrentStockMapper.insertZnMaterialCurrentStock(znMaterialCurrentStock);
    }

    /**
     * 修改产品当前库存
     * 
     * @param znMaterialCurrentStock 产品当前库存
     * @return 结果
     */
    @Override
    public int updateZnMaterialCurrentStock(ZnMaterialCurrentStock znMaterialCurrentStock)
    {
        return znMaterialCurrentStockMapper.updateZnMaterialCurrentStock(znMaterialCurrentStock);
    }

    /**
     * 批量删除产品当前库存
     * 
     * @param ids 需要删除的产品当前库存主键
     * @return 结果
     */
    @Override
    public int deleteZnMaterialCurrentStockByIds(Long[] ids)
    {
        return znMaterialCurrentStockMapper.deleteZnMaterialCurrentStockByIds(ids);
    }

    /**
     * 删除产品当前库存信息
     * 
     * @param id 产品当前库存主键
     * @return 结果
     */
    @Override
    public int deleteZnMaterialCurrentStockById(Long id)
    {
        return znMaterialCurrentStockMapper.deleteZnMaterialCurrentStockById(id);
    }

    @Override
    public int batchznMaterialCurrentStocks(List<ZnMaterialCurrentStock> znMaterialCurrentStocks) {
       return znMaterialCurrentStockMapper.batchznMaterialCurrentStocks(znMaterialCurrentStocks);
    }
}
